﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ninject;

namespace PocketBook.UI.Infrastructure
{
    public class DependencyResolver : IDependencyResolver
    {
        private static IKernel _kernel;
        private IKernel Kernel
        {
            get
            {
                _kernel = new StandardKernel(new DependencyModule());
                return _kernel;
            }
        }

        public T Get<T>() where T : class
        {
            return Kernel.Get<T>();
        }

        public object Get(Type type)
        {
            return Kernel.Get(type);
        }
    }
}
